function fig_RDShell_welfare(DateVec, ratios, totalWelfare, optfig)

if optfig.plotfig == 1
    
    [fontname,dimension,lw,folder,color,style,marker,markersize,fontsize_tit,fontsize_ax,fontsize_lab,fontsize_leg] = fn_optfig(optfig);
    
    % define plotting variables
    x = DateVec(261:end,1);
    y = ratios;
    z = abs(totalWelfare);
    
    f0 = figure('Units','inches','Position',dimension);
    
    left_color = [0 0 0];
    right_color = [0 0 0];
    set(f0,'defaultAxesColorOrder',[left_color; right_color]);
    
    yyaxis left
%     plot(x,ones(size(x)),'Color',[0 0 0],'LineStyle',style{3},'LineWidth',1); hold on;
    plot(x,y,'Color',color{2},'LineStyle',style{2},'LineWidth',lw); hold on;
    xlabel('Year','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname)
    ylabel('Deviation from Parity','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname)
    
    yyaxis right
    plot(x, z/1e9,'Color', color{5},'LineStyle',style{1},'LineWidth',lw);
    ytickformat('$%gB')
    ylabel('Welfare Gains (billions of USD)','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname) 

    title('Welfare Gains: Royal Dutch/Shell', 'interpreter','latex','FontSize',fontsize_tit,'FontName',fontname)
    grid; axis tight; box off;
    
    legendCell = {'Deviation (left)', 'Welfare Gains (right)'};
    legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','best')
    legend boxoff
end

name = '07_Welfare_RDShell';
print(f0,'-depsc','-painters','-noui','-r600',[folder,name,'.eps'])

end